package com.wits.platform.service.account;

import java.io.Serializable;

/**
 * 自定义Authentication对象，使得Subject除了携带用户的登录名外还可以携带更多信息.
 */
public class ShiroUser implements Serializable {

	private static final long serialVersionUID = -1748602382963711884L;
	
	private String id;
	private String name;
	
	private String userType;
	
	/**
	 * 班级Id,处理用户异步上下文时获得
	 */
	private String classId;


	public ShiroUser(String id) {
		this.id=id;
	}
	
	public ShiroUser(String id,String name) {
		this.id=id;
		this.name=name;
	}
	public ShiroUser(String id,String name,String userType) {
		this.id=id;
		this.name=name;
		this.userType=userType;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}


	public String getName() {
		return name;
	}
	
	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}
	
	public String getClassId() {
		return classId;
	}

	public void setClassId(String classId) {
		this.classId = classId;
	}
	

	/**
	 * 本函数输出将作为默认的<shiro:principal/>输出.
	 */
	@Override
	public String toString() {
		return name;
	}
}